{% extends "base.html" %}
{% block content %}
<div id="full-article">
    <h3 class="article-title">{{ sitetitle }} Newsletter</h3>
    
    <p>Newsletter intro goes here.</p>

    <p><a href="{{ newsletterurl }}">Click here to view our current newsletter</a></p>

    <h3 class="article-title">Email Subscription</h3>
    <p>To subscribe for this convenient resource, you must be a registered member of the site.</p>
    {% if nickname %}
        {% if subscriber %}
        <p>You are currently subscibed to our newsletter.  Click the button below to unsubscribe:</p>
        <form action="/newsletter" method="post"><input type="submit" name="action" value="Unsubscribe"></form>
        {% else %}
        <p>You are not currently subscribed to our newsletter.  Click the button below to subscribe:</p>
        <form action="/newsletter" method="post"><input type="submit" name="action" value="Subscribe"></form>
        {% endif %}
    {% else %}
        {% if username %}
        <p>You are signed in with your Google account, but not registered as a {{ sitetitle }} Member.  <a href="/register">Register</a> to subscribe to our newsletter.<p>
        {% else %}
        <p><a href="{{ loginurl }}">Sign in</a> to {{ sitetitle }} to subscribe to our newsletter.<p>
        {% endif %}
    {% endif %}
</div>
{% endblock %}